﻿using TA.Turbo.Controls;

namespace TA.Turbo
{
	internal class CurrentPostScenario : PostScenario
	{
		#region PUBLIC
		#region INIT
		/// <summary>
		/// Copy ctor. Adds the newly created scenario to the source's parent control. 
		/// </summary>
		public CurrentPostScenario(PostScenario source)
			: base(source)
		{
			this._original = source;

			source.Parent.Controls.Add(this);
			this.ID = source.ID + "_Current";

			this.GroupIds = source.GroupIds;
			this.UpdatePanelIds = source.UpdatePanelIds;
			this.PostControlIds = source.PostControlIds;
			this.ReturnControlIds = source.ReturnControlIds;
		}
		#endregion
		#region PROPS
		public PostScenario Original
		{
			get
			{
				return this._original;
			}
		}
		#endregion
		#region METHODS
		public override bool IsSame(PostScenario that)
		{
			return this.Original == that || this == that;
		}
		#endregion
		#endregion
		#region INTERNAL
		#region VARS
		PostScenario _original;
		#endregion
		#region METHODS
		#endregion
		#endregion
	}
}
